package com.rcl.mvvmdemo.api

import com.example.jetpacktaobao.domain.ArticleList
import com.example.jetpacktaobao.domain.DiscoveryPage
import com.example.jetpacktaobao.domain.WanResultData
import com.rcl.mvvmdemo.domain.OnSellData
import com.rcl.mvvmdemo.domain.ResultData
import retrofit2.http.GET
import retrofit2.http.Path

interface ApiServer {
    companion object {
        const val BASE_URL = "https://api.sunofbeaches.com/shop/"

        //wanAndroid
        const val BASE_URL_WAN_ANDROID = "https://www.wanandroid.com/"
    }

    @GET("/discovery/categories")
    suspend fun getDiscoveryPageCategories(): ResultData<DiscoveryPage>

    @GET("onSell/{page}")
    suspend fun getOnSellList(@Path(value = "page") page: Int): ResultData<OnSellData>

    @GET("article/list/{page}/json")
    suspend fun getWanArticleList(@Path(value = "page") page: Int): WanResultData<ArticleList>
}